/*
 * Copyright 2010 Biz-e (info@biz-e.nl)
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package nl.biz_e.site.client;

import java.util.List;

import nl.biz_e.site.shared.models.NewsItem;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.googlecode.objectify.Key;

/**
 * Async interface for {@link NewsService}
 * 
 * @author Joost A. Bloemsma
 */
public interface NewsServiceAsync {
	/**
	 * @see NewsService#saveNewsItem(NewsItem, String)
	 * @param item
	 * @param fullText
	 * @param async
	 */
	public void saveNewsItem(NewsItem item, String fullText, AsyncCallback<NewsItem> async);
	
	/**
	 * @see NewsService#getLastNewsItems(int)
	 * @param count
	 * @param async
	 */
	public void getLastNewsItems(int count, AsyncCallback<List<NewsItem>> async);
	
	/**
	 * @see NewsService#getNewsItemByNr(long)
	 * @param seqNr
	 * @param async
	 */
	public void getNewsItemByNr(long seqNr, AsyncCallback<NewsItem> async);
	
	/**
	 * @see NewsService#getAllKeys()
	 * @param async
	 */
	public void getAllKeys(AsyncCallback<List<Key<NewsItem>>> async);
	
	/**
	 * @see NewsService#getFullText(NewsItem)
	 * @param item
	 * @param async
	 */
	public void getFullText(NewsItem item, AsyncCallback<String> async);
	
	/**
	 * @see NewsService#getAll()
	 * @param async
	 */
	public void getAll(AsyncCallback<List<NewsItem>> async);
}
